﻿@model IEnumerable<MIMSDomain.Entities.MedicalPersonnel>

@{
    ViewBag.Title = "Index";
}

<h1>Grid Data | Medical Personnel</h1>

<div id="MedicalPersonnel">
     @(Html.Telerik().Grid(Model)
     .DataKeys(keys => keys.Add(p => p.Id))
     .Name("MedicalPersonnel")
     .ToolBar(commands => commands.Custom().Text("Add New Personnel").Action("AddMedicalPersonnel", "MedicalPersonnels"))
     .Columns(columns =>
         {
             columns.Command(command =>
                 {
                     command.Custom("Edit").Text("Edit").ButtonType(GridButtonType.ImageAndText)
                         .Action("EditMedicalPersonnel", "MedicalPersonnels");
                     command.Delete().ButtonType(GridButtonType.ImageAndText);
                     command.Custom("View").Text("View Details")
                         .Action("MedicalPersonnel", "MedicalPersonnels");
                 });
             columns.Bound(m => m.Code);
             columns.Bound(m => m.FirstName);
             columns.Bound(m => m.MiddleName);
             columns.Bound(m => m.LastName);
             columns.Bound(m => m.MedicalPersonnelType);
         })
     .Pageable(pageable => pageable.Enabled(true))
     .Editable(editing => editing.Enabled(false))
     .Filterable(filterable => filterable.Enabled(true))
     .Groupable(groupable => groupable.Enabled(true))
     .Footer(true))
</div>

